 <!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/css/page.css" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
	<script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
    
	<script src="__PUBLIC__/template_files/LodopFuncs.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

   <script type="text/javascript">
		function page(n,s){
			var shoptitle=$('#shoptitle').val();
			var service=$('#service').val();
			var starttime=$('#starttime').val();
			var endtime=$('#endtime').val();
			var tid=$('#tid').val();
			var title=$('#title').val();
			var phone=$('#phone').val();
			var name=$('#name').val();
			var asc=$('#asc').val();
			var invoice_no=$('#invoice_no').val();
			var outer_iid=$('#outer_iid').val();
			location.href='index?pageNo='+n+'&pageSize='+s+'&shoptitle='+shoptitle+'&service='+service+'&starttime='+starttime+'&endtime='+endtime+'&tid='+tid+'&title='+title+'&phone='+phone+'&name='+name+'&asc='+asc+'&invoice_no='+invoice_no+'&outer_iid='+outer_iid;
	    	return false;
	    }
		
		function dele(id)
		{
		    layer.confirm('确定要删除吗？',
			              {btn:['确定','取消']},
							  function(){
							      location.href="customer_delete/tid/"+id
							  }
						  ),
						
						  function(){return false;} 
						  
		}
		
	   function exportdata(){
		    var shoptitle=$('#shoptitle').val();
			var starttime=$('#starttime').val();
			var endtime=$('#endtime').val();
			var tid=$('#tid').val();
			var title=$('#title').val();
			var phone=$('#phone').val();
			var name=$('#name').val();
			var asc=$('#asc').val();
			location.href='customer_export?shoptitle='+shoptitle+'&starttime='+starttime+'&endtime='+endtime+'&tid='+tid+'&title='+title+'&phone='+phone+'&name='+name+'&asc='+asc;
	    	return false;
	    }
		
		/*function list_sort(name){
			if($('#asc').val()=='asc'){
				var asc='desc';
			}else{
				var asc='asc';
			}
			var title=$('#title').val();
			var phone=$('#phone').val();
			var orderno=$('#orderno').val();
			location.href='find?pageNo='+{$count.pageNo}+'&pageSize='+{$count.pageSize}+'&title='+title+'&phone='+phone+'&orderno='+orderno+'&name='+name+'&asc='+asc;
		}*/
	</script>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
         
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>客户列表</h5>
                        
                    </div>
                    <div class="ibox-content">
					<form id="searchForm" class="form-inline" method="post" action="{:U('index')}" >
					<div class="row">
                            <input type='hidden' name='pageNo' value='1' />
                            <input type='hidden' name='pageSize' value='10' />
                            <input type='hidden' id='name' name='name' value='{$order.name}' />
                            <input type='hidden' id='asc' name='asc' value='{$order.asc}' />
                            
                            <div class='search'>
                               <select name='shoptitle' class="form-control input-sm" id='shoptitle' style='margin-top:-5px;padding-top:0px'>
                                   <option value='0'>店铺</option>
                                   <foreach name="group_list" item="group" >
								   
                                   <option <?php echo   $group['shop_name']==$data['shoptitle']?'selected':''; ?> >{$group.shop_name}</option>
                                   </foreach>
                               </select> 
                               <select name='service' class="form-control input-sm" id='service' style='margin-top:-5px;padding-top:0px'>
                                   <option value=''>客服</option>
                                   <foreach name="service_list" item="service" >
								   
                                   <option value="{$service.id}" <?php echo $service['id']==$data['service']?'selected':''; ?> >{$service.name}</option>
                                   </foreach>
                               </select> 
                               
                               <input class="form-control input-sm" placeholder="开始时间" name="starttime" id="starttime" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="<?php echo empty($data['starttime'])?'':$data['starttime']; ?>" >
							   
							   <input class="form-control input-sm" placeholder="结束时间" name="endtime" id="endtime" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="<?php echo empty($data['endtime'])?'':$data['endtime']; ?>" >
								
							   <input type="text" placeholder="订单号" name='tid' id='tid' class="input-sm form-control" value='{$data.tid}'> 
                                
                               <input type="text" placeholder="快递单号" name='invoice_no' id='invoice_no' class="input-sm form-control" value='{$data.invoice_no}'>  
                               
                               <input type="text" placeholder="产品编码" name='outer_iid' id='outer_iid' class="input-sm form-control" value='{$data.outer_iid}'>  
                               
                               <input type="text" placeholder="客户姓名" name='title' id='title' class="input-sm form-control" value='{$data.receiver_name}'>  
                                                      
							   <input type="text" placeholder="电话" name='phone' id='phone' class="input-sm form-control" value='{$data.receiver_mobile}'>  
							   
							
							    <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
								<a class="btn btn-white btn-sm " href="javascript:window.location.reload(true);" data-toggle="tooltip" data-placement="left"   title="刷新"> <i class="glyphicon glyphicon-repeat"></i> 刷新</a>  
							    
                                 <button type="button" class="btn btn-sm btn-primary" onclick="exportdata()"> 导出</button>
                            </div>
                        </div>
					    </form>
						<form>
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
								    <th><input class="check-all" type="checkbox" /></th>
                                   	<th>ID</th>
								   	<th>时间</th>
									<th>姓名</th>
									<th>电话</th>
									<th>订单号</th>
									<th>产品编码</th>
									<th>数量</th>
									<th>实发</th>
									<th>金额</th>
                                    <th>快递</th>
                                    <th>快递单号</th>
									<th width="300px;">快递状态</th>
									<th>快递费</th>
									<th>卖家备注</th>
                                    <th>备注旗帜</th>
                                    <th>买家备注</th>
									<th>客服</th>
									<th>店铺</th>
									<th>审核状态</th>
                                    <th>订单状态</th>
                                    <th>发货状态</th>
									<th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
							<foreach name="order_list" item="vo" >
                               <foreach name="vo.orders" item="order" >
								<tr>
                                    <if condition="$key eq 0">
                                        <td rowspan='{$vo.orders_count}'><input class="i-checks" type="checkbox" name="ids" value="{$vo.tid}" /></td>
                                        <td rowspan='{$vo.orders_count}' >{$vo.id}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.pay_time}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.receiver_name} <if condition=" $vo['orders_refund'] "><span style='background:#F806FD;color:white'>退</span></if></td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.receiver_mobile} <if condition=" !empty($vo['receiver_mobile']) && !empty($vo['receiver_phone']) "> |</if>  {$vo.receiver_phone}</td>
                                        <td rowspan='{$vo.orders_count}' style="color:<?php echo $order['oid']==$order['tid']?'':'red' ?>">{$vo.tid}</td>
                                    </if>
                                        <td>{$order.outer_iid}</td>
                                        <td>{$order.num}</td>
                                        <td>{$order.shifa}</td>
                                    <if condition="$key eq 0">
                                        <td rowspan='{$vo.orders_count}' class="payment">{$vo.payment}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.logistics_company}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.waybill_code}</td>
                                        <td rowspan='{$vo.orders_count}'>
    <!--                                      <iframe style="width: 200px; height: 20px;border: 0px; padding-left:30px; " frameborder="0" scrolling="no" marginwidth="0" marginheight="0" src="http://www.aikuaidi.cn/rest/?id={$vo.aikuaidi}&order={$vo.invoice_no}&key=084cfb6ef65d4c1da5e43d1630f82ea9&show=html"></iframe>
    -->                                    </td>
                                        <td rowspan='{$vo.orders_count}' class="post_fee">{$vo.post_fee}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.seller_memo}</td>
                                        <td rowspan='{$vo.orders_count}'><if condition=" !empty($vo['seller_flag']) "><img src="__PUBLIC__/img/flag/op_memo_{$vo.seller_flag}.png"></if></td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.buyer_memo}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.service_name}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.shop}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.sh_status_name}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.status_name}</td>
                                        <td rowspan='{$vo.orders_count}'>{$vo.send_status_name}</td>
                                        <td rowspan='{$vo.orders_count}'>
                                            <a class="btn btn-sm btn-primary" title="编辑" href="{:U('customer_edit_info',array('tid'=>$vo['tid']))}">编辑</a>
                                            <if condition=" $user_type eq 2 "> 
                                            <a class="btn btn-sm btn-primary" title="删除"  onclick="dele({$vo.tid})">删除</a>
                                            </if>
                                        </td>
                                        </if>
									 
								  </tr>
                              </foreach>    
							</foreach>
                            </tbody>
                        </table>
					    
                        
                        <table width="100%">
                          <tr>
                          	<td width="">
                              <select name='template' class="form-control input-sm" id='template' style='padding-top:0px'>
                                   <option value='0'>请选择快递</option>
                                   <foreach name="template_list" item="template" >
                                   <option value='{$template.id}' <?php echo $template['name']=='圆通速递_电子面单'?'selected':'' ?> >{$template.name}</option>
                                   </foreach>
                               </select> 
                           </td>
                           
                           <td width="">
                              <select name='address' id='address' class="form-control input-sm" style='padding-top:0px'>
                                   <option value=''>请选择发货地址</option>
                                   <foreach name="address_list" item="address" >
                                   <option value='{$address.id}' <?php echo $address['is_default']==1?'selected':'' ?> >{$address.full_address}</option>
                                   </foreach>
                               </select> 
                           </td>
                           
                           <td>
                               <select class="form-control input-sm" style='padding-top:0px' id="PrinterList" size="1"></select>
                           </td>
                           
                           
                           <td align='center' style='font-size:15px'> 
                               <input type='checkbox' id='merge' checked>合并订单
                           </td> 
                           
                            <td align='center' style='font-size:15px'> 
                               <input type='checkbox' id='exclude' checked>排除已打印
                              
                           </td>
                           
                           <td> 
                               <button class="btn btn-sm btn-primary" title="打印快递单" id="check" >打印快递单</button>
                           </td>
                           
                          </tr>
                        </table><br/>
                        
						</form>
						
	<!-- 分页代码 -->
<div class="fixed-table-pagination" style="display: block;">
	<div class="pull-left pagination-detail">
		<span class="pagination-info">显示第 1 到第 10 条记录，总共 {$count.count} 条记录</span>
		<span class="page-list">每页显示 
			<span class="btn-group dropup">
				<button type="button" class="btn btn-default  btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
					<span class="page-size">{$count.pageSize}</span> <span class="caret"></span></button>
					<ul class="dropdown-menu" role="menu">
					<li class="<if condition=" $count.pageSize eq 10"> active </if>"><a href="javascript:page(1,10,'');">10</a></li>
					<li class="<if condition=" $count.pageSize eq 25"> active </if>"><a href="javascript:page(1,25,'');">25</a></li>
					<li class="<if condition=" $count.pageSize eq 50"> active </if>"><a href="javascript:page(1,50,'');">50</a></li>
					<li class="<if condition=" $count.pageSize eq 100"> active </if>"><a href="javascript:page(1,100,'');">100</a></li>
					</ul>
					</span> 条记录</span>
				</div>
				<div class="pull-right pagination-roll">
				<ul class="pagination pagination-outline">
					<li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page(1,{$count.pageSize},'');"><i class="fa fa-angle-double-left"></i></a></li>
					<li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}-1,{$count.pageSize},'');"><i class="fa fa-angle-left"></i></a></li>
					 <if condition=" $count.countpage gt 10 "> 
					 	<if condition=" $count.pageNo lt 5 "> 
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==1)?'current':'' ?>">1</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(2,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==2)?'current':'' ?>">2</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(3,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==3)?'current':'' ?>">3</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(4,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==4)?'current':'' ?>">4</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(5,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==5)?'current':'' ?>">5</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(6,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==6)?'current':'' ?>">6</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(7,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==7)?'current':'' ?>">7</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(8,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==8)?'current':'' ?>">8</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
						<elseif condition="$count.pageNo lt $count.num and $count.pageNo egt 5"/>
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.pageNo},{$count.pageSize},'');" id='current'><?php echo $count['pageNo']; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+2; ?></a></li> 
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+3; ?></a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
						<else />
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-4; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-4))?'current':'' ?>"><?php echo $count['countpage']-4; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-3; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-3))?'current':'' ?>"><?php echo $count['countpage']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-2; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-2))?'current':'' ?>"><?php echo $count['countpage']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-1; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-1))?'current':'' ?>"><?php echo $count['countpage']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==$count['countpage'])?'current':'' ?>"><?php echo $count['countpage']; ?></a></li>
						</if>
					<else />
						<for start="0" end="$count.countpage" name='i'>
							<li class="paginate_button <if condition=" $count.pageNo eq $i+1"> previous disabled </if>"><a href="javascript:" onClick="page({$i+1},{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($i+1))?'current':'' ?>">{$i+1}</a></li>
						</for>
					</if>
					<li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}+1,{$count.pageSize},'');"><i class="fa fa-angle-right"></i></a></li>
					<li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');"><i class="fa fa-angle-double-right"></i></a></li>
				</ul>
			</div>
		</div>
	
	<div style="color:#1AB394;word-spacing:10px"><br>
<br>
<br>
<br> 

                             <p>查询合计金额：<span>{$statistics.payment}</span> 查询合计快递费： <span >{$statistics.youfei}</span> 查询合计单数： <span>{$statistics.dan}</span></p>
                             <p> 当前页合计金额：<span>{$statistics.ye_payment}</span> 当前页合计快递费：<span>{$statistics.ye_youfei}</span> 当前页合计单数: <span>{$statistics.ye_dan}</span> </p>
							 <!-- <p> 当前页合计金额：<span class="pany_sum">0</span> 当前页合计快递费：<span class="post_sum">0</span> 当前页合计单数: <span class="pany_count">0</span> </p>-->
                             
                         </div>
	</div>
	
	</div>

</div>


<object id="LODOP_OB" width="0" height="0" style="position:absolute;left:0px;top:-10px;" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA"></object>
<object id="LODOP_EM" width="0" height="0" style="position:absolute;left:0px;top:-10px;" type="application/x-print-lodop"></object>

                    </div>
                </div>
            </div>
             
        </div>
         
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/js/demo/peity-demo.min.js"></script>
	<script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
	 <if condition=" isset($res2)"> 
	 <if condition=" $res2 eq true "> 
		<script>layer.alert('删除成功');</script>
		<else />
		<script>layer.alert('删除失败');</script>
	</if>
	</if>
	 <if condition=" isset($res3)"> 
	 <if condition=" $res3 eq true "> 
		<script>layer.alert('新增成功');</script>
		<else />
		<script>layer.alert('新增失败');</script>
	</if>
	</if>
	 <if condition=" isset($res5)"> 
	 <if condition=" $res5 eq true "> 
		<script>layer.alert('修改成功');</script>
		<else />
		<script>layer.alert('修改失败');</script>
	</if>
	</if>
    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
		 $(document).ready(function () {
		
            $('.check-all').iCheck({
			 
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
		
	
	$(document).ready(function() {
    $('.check-all').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('check');
    	});

    $('.check-all').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('uncheck');
    	});
	
    
	CreatePrinterList();
	function CreatePrinterList(){
	    if (document.getElementById('PrinterList').innerHTML!="") return;
		LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
		var iPrinterCount=LODOP.GET_PRINTER_COUNT();
		for(var i=0;i<iPrinterCount;i++){

   			var option=document.createElement('option');
   			option.innerHTML=LODOP.GET_PRINTER_NAME(i);
   			option.value=i;
			document.getElementById('PrinterList').appendChild(option);
		};	
	}; 
   
   function get_tids()
	{    
	    var tids='';
		$('.i-checks').each(function(){
			if($(this).prop('checked')){
				tids+=$(this).val()+',';
			}
		 })
		 
		 return tids;
	}	
	
   $('#check').click(function(e){
	   e.preventDefault();
	   
	    var template_id=$('#template').val();
		var printer=$('#PrinterList').val();//打印机
		var exclude=$('#exclude').prop('checked');
		var merge=$('#merge').prop('merge');
		var address_id=$('#address').val();
		 
		var tids=get_tids();
		var tr= $('#msg_table').find('tbody').find('tr');
		
		$('.i-checks').each(function(){
			  if($(this).prop('checked') && $(this).parents('tr').find('.waybill_code').text()=='')
			  {
				  ydh='null';
			  } 
		 })
	   
	   if(ydh='null')
	   {
		   layer.alert('快递单号不能为空');
		   return false;
	   }
	  
	   if(tids==''){ 
			layer.alert('请选择要打印的订单！');return false;
		}
	   if(template_id==0){
		   layer.alert('请选择快递！');return false;
		}
		if(address_id==''){
		   layer.alert('请选择发货地址！');return false;
		}
		
		$.ajax({
			url:"{:U('template_print')}",    //请求的url地址
			dataType:"script",   //返回格式为script
			data:{"template_id":template_id,"printer":printer,"tids":tids,"exclude":exclude,"merge":merge,"address_id":address_id},    //参数值
			type:"GET",   //请求方式
			success:function(req){ 
				//LODOP.PREVIEW();
				
				//LODOP.PRINT();
			}
		});
	}) 
	
	
});
/*$(function(){
	//计算金额
	$(window).load(function(){
		var obj = $(".payment");
		var fee	= $(".post_fee");
		var sum = 0;
		var youfei = 0;
		var tiao = obj.length;
		for(var i =0;i< obj.length;i++){
			var pv = (obj.eq(i).text())*1;
			
			var kuai = parseFloat(fee.eq(i).text());
			sum += pv;
			
			youfei += kuai;
			
		}
		
		$(".post_sum").text(youfei.toFixed(2));
		$(".pany_sum").text(sum.toFixed(2));
		$(".pany_count").text(tiao);
	});


}());*/

    </script>
    <div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>
<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>
</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
